<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
mysql_connect("localhost","root","root");
mysql_select_db("interfacetest");
$keyword=$_GET[key];
$query = "SELECT * FROM shopinfo where shopkeyword like '$keyword'"; 
mysql_query("SET NAMES 'utf8'");
$rs = mysql_query($query);                     //获取数据集
if(!$rs){die("Valid result!");}
while($row=mysql_fetch_row($rs))
       {
            echo "编号：    ".$row[0]."<br>";
            echo "店名：    ".$row[1]."<br>";
            echo "价格：    ".$row[2]."<br>";
            echo "星级：    ".$row[3]."<br>";
            echo "折扣：    ".$row[4]."<br>";
            echo "距离：    ".$row[5]."<br>";
            echo "分类：    ".$row[6]."<br>";
            echo "<br>";
       }
mysql_free_result($rs);
?>